define([
        'jquery'


   
        ], function ($){
	

	
	var UpdateView = function() {
		
	};
	
	UpdateView.prototype = {
			drawing : function(user,res) {		
		
				var $mainDiv = $('#main');
				var $updateFormDiv = $('<form id = "updateForm"></form>');

				$mainDiv.html("");
				$mainDiv.append($updateFormDiv[0]);

				var label1 = "<label>아이디 &nbsp;</label>";
				$updateFormDiv.append(label1);  //폼, 라벨 추가
				$('<input>',{type : "text", id : "id", value : user.getId(), disabled : true}).appendTo($updateFormDiv);
								
				var label2 = "<br><label>비밀번호 &nbsp;</label>";
				$updateFormDiv.append(label2);
				$('<input>',{type : "password", id : "password1", value : user.getPassword()}).appendTo($updateFormDiv);

				var label3 = "<br><label>비밀번호 재입력 &nbsp;</label>";
				$updateFormDiv.append(label3);
				$('<input>',{type : "password", id : "password2"}).appendTo($updateFormDiv);

				var label4 = "<br><label>이름 &nbsp;</label>";
				$updateFormDiv.append(label4);  //폼, 라벨 추가
				$('<input>',{type : "text", id : "name", value : user.getName(), disabled : true}).appendTo($updateFormDiv);

				var label5 = "<br><label>나이 &nbsp;</label>";
				$updateFormDiv.append(label5);  //폼, 라벨 추가
				$('<input>',{type : "number", id : "age", max : "3"}).appendTo($updateFormDiv);

				this.$input1 = $('<input>',{type : "button", value : '회원정보 수정', class : "button"}).appendTo($updateFormDiv);

				this.$input2 = $('<input>',{type : "button", value : '취소', class : "button"}).appendTo($updateFormDiv);
				
			},
			setUpdateEvent : function(func) {
				
				this.$input1.on('click',func);
			},
			
			setCancelEvent : function(func) {
				
				this.$input2.on('click', func);
			}
	};
	
	
	
	
	return	UpdateView;
	
});
